package com.pro.grpcserver;

import java.util.Random;

public enum  HostEnum {

	CLIENT_150("172.16.0.150",8181),
	CLIENT_151("172.16.0.151",8183),
	CLIENT_199("172.16.0.199",8184);

	private String hots;
	private int port;

	HostEnum(String hots, int port) {
		this.hots = hots;
		this.port = port;
	}

	public String getHots() {
		return hots;
	}

	public void setHots(String hots) {
		this.hots = hots;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public static HostEnum getRandomEnum(){
		HostEnum [] hostEnums =HostEnum.values();
		Random random =new Random();
		System.out.print(hostEnums.length);
		return hostEnums[random.nextInt(hostEnums.length)];
	}
}
